import request from '@/utils/request'

export function add(data) {
  return request({
    url: '/area',
    method: 'post',
    data
  })
}
export function update(data) {
  return request({
    url: '/area',
    method: 'put',
    data
  })
}

export function list(parentCode) {
  return request({
    url: '/area/list/' + parentCode,
    method: 'get'
  })
}

export function getById(token) {
  return request({
    url: '/area',
    method: 'get',
    params: { token }
  })
}



export function getztree() {
  return request({
    url: '/area/page',
    method: 'post',
  })
}

